package com.hf.wujian.dispatch.imp;

import com.hf.wujian.annotation.Dispatch;
import com.hf.wujian.constant.Command;
import com.hf.wujian.dispatch.BSHDispatch;
import com.hf.wujian.model.GameHall;
import com.hf.wujian.model.GameUser;
import com.hf.wujian.netty.NettyMsg;
import io.netty.channel.ChannelHandlerContext;

/**
 * 退出大厅调度类
 *
 * @author hf
 * @date 2018/11/23
 * @version 1.0
 *
 */
@Dispatch(command = Command.COMMAND_EXIT)
public class ExitDispatch implements BSHDispatch {

    @Override
    public void dispatch(ChannelHandlerContext ctx, NettyMsg nettyMsg, GameHall gameHall, GameUser gameUser) {
        gameHall.removeGameUser(gameUser,ctx);
    }
}
